{#{% extends 'Base/main.content.lists.div.html.twig' %}#}
{#{% import 'Base/list_item.twig' as listItem %}#}
{% extends 'Back/Sano/list.creator.html.twig' %}
{% import 'Back/Sano/list.item.twig' as listItem %}
{#默认不能删除和新增#}
{% block addBtn %}{% endblock %}
{% block delBtn %}{% endblock %}
{% block tableHead %}
    <tr>
        <th align="" width="5%">选择</th>
        <th align="" width="">{{config.fromUser.label}}</th>
        <th align="" width="">{{config.toUser.label}}</th>
        <th align="" width="">{{config.content.label}}</th>
        <th align="" width="">{{config.createAt.label}}</th>
        <th align="" width="">{{config.link.label}}</th>
        <th align="center" width="8%">操作</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.id }}"/></span>
            </td>
            <td align='' width='' id='fromUser_{{ Entity.id }}'>
                {{ listItem.text('fromUser',Entity.fromUser,Entity.id) }}
                {{ Entity.fromUser ?'':'【平台回复】' }}
            </td>
            <td align='' width='' id='toUser_{{ Entity.id }}'>
                {{ listItem.text('toUser',Entity.toUser,Entity.id) }}
                {{ Entity.toUser ?'':'【平台接收】' }}
            </td>
            <td align='' width='' id='content_{{ Entity.id }}'>
                {{ listItem.article('content',Entity.content,Entity.id) }}
            </td>
            <td align='' width='' id='createAt_{{ Entity.id }}'>
                {{ listItem.day('createAt',Entity.createAt,Entity.id) }}
            </td>
            <td align='' width='' id='link_{{ Entity.id }}'>
                {% if not Entity.toUser %}
{#                {{ listItem.text('link',Entity.link,Entity.id) }}#}
                {{ Entity.status == 0 ? "等待回复":'' }}
                {{ Entity.status == 1 ? "已回复":'' }}
                {{ Entity.status == 2 ? "已扣费":'' }}
                {% endif %}
{#                {{ Entity.flag  }}#}
            </td>
            <td align='' width=''>
{#                {{ listItem.edit('Chat','',Entity.id) }}#}
                {% if not Entity.toUser %}
                    <div class="layui-btn-group">
                        <a href="{{ path( "ChatPreReply",{'id':Entity.id}) }}" class="btn btn-outline-primary btn-sm">回复</a>
                        <a href="{{ path( "ChatPreReplyPay",{'id':Entity.id}) }}" class="btn btn-outline-primary btn-sm">扣费</a>
                    </div>
                {% endif %}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

